package com.welfare.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.staff.entity.Staff;

@Entity
@Table(name="t_welfarerecord")
public class WelfareRecord {//福利分配记录实体类，实现关联关系
	private Long id;
	private float amount;
	private String description;
	private boolean status;
	private Date assignDate;
	private Date payDate;
	private Welfare welfare;
	private List<Staff> staffs = new ArrayList();
	private Staff operator;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	@ManyToOne(cascade=CascadeType.ALL)
	public Welfare getWelfare() {
		return welfare;
	}
	@ManyToMany(cascade=CascadeType.ALL)
	public List<Staff> getStaffs() {
		return staffs;
	}
	@ManyToOne(cascade=CascadeType.ALL)
	public Staff getOperator() {
		return operator;
	}

	public float getAmount() {
		return amount;
	}
	public String getDescription() {
		return description;
	}
	public boolean isStatus() {
		return status;
	}
	public Date getAssignDate() {
		return assignDate;
	}
	public Date getPayDate() {
		return payDate;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public void setAmount(float amount) {
		this.amount = amount;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public void setStatus(boolean status) {
		this.status = status;
	}
	public void setAssignDate(Date assignDate) {
		this.assignDate = assignDate;
	}
	public void setPayDate(Date payDate) {
		this.payDate = payDate;
	}

	public void setWelfare(Welfare welfare) {
		this.welfare = welfare;
	}

	public void setStaffs(List<Staff> staffs) {
		this.staffs = staffs;
	}

	public void setOperator(Staff operator) {
		this.operator = operator;
	}

	
}
